﻿using DongFangGuoKai.WMSPlatform.Domain.Model;
using DongFangGuoKai.WMSPlatform.Service.BasicApp.Pallet.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DongFangGuoKai.WMSPlatform.Service.BasicApp.Pallet
{
    public interface IPalletService
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool AddPallet(PalletDto dto);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool UpdatePallet(PalletDto dto);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool DelPallet(int ids);

        /// <summary>
        /// 托盘分页查询
        /// </summary>
        /// <param name="name"></param>
        /// <param name="type"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TPallets> GetPallets(string name, int type, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 条件查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        TPallets GetPallet(int id);

        bool BatchAddPallet(List<TPallets> pallets);

        /// <summary>
        /// 批量添加托盘
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddPalletList(BatchPalletDTO m, out string errMsg);

        /// <summary>
        /// 托盘打印
        /// </summary>
        /// <param name="codes"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        bool PallPrintCount(string[] codes, out string errMsg);
    }
}
